package aooO.crm.mapper;


import aooO.crm.pojo.Activity;
import aooO.crm.pojo.FunnelVO;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface ActivityMapper {

    /***
     * 分页查询
     * pageNo:pageNo,
     * pageSize:pageSize
     * @return
     */
    List<Activity> queryActivityByConditionForPage(HashMap<String,Object> map);

    //查询总条数
    int selectAllCount(HashMap<String,Object> map);

    int insert(Activity activity);

    int deleteActivityByIds(String[] ids);

    /**
     * 详细的activity
     * @param id
     * @return
     */
    Activity queryActivityById(String id);    //得到一个activity的详情

    int saveEditActivity(Activity activity);

    List<Activity> selectAllActivities();

    List<Activity> selectActivitiesByIds(String[] id);

    int insertByList(List<Activity> activity);

    Activity selectActivityDetailById(String id);

    /**
     * 根据线索id查相关市场活动
     * @param clue_id
     * @return
     */
    List<Activity> selectAllActivityByClueId(String clue_id);

//    String clueId,String activityName
    List<Activity> queryActivityForDetailByNameAndClueId(Map<String,Object> map);

    //查找与线索关联过的市场活动
    List<Activity> queryActivityForConvertByNameAndClueId(Map<String,Object> map);

    //查询所有与联系人关联的活动
    List<Activity> selectActivityForDetailByContactsId(String contacts_id);

    // 查询对应id的联系人所关联的市场活动
    List<Activity> queryActivityForDetailByNameAndContactsId(Map<String,Object> map);

    //根据名称模糊查询市场活动
    List<Activity> selectActivityByFuzzyName(String activityName);

    /**
     * 查看个人获得的市场活动数量   Service层还没有写
     */
    List<FunnelVO> selectCountOfActivityGroupByOwner();
}